<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
<script>
    let ws = new WebSocket("ws://localhost:8080/myWs1");
    ws.onopen = function (event) {
        console.log("连接成功");
        ws.send("你好,你好。你好,你好,你好。我的头发是真发");
    }

    ws.onmessage = function (event) {
        console.log(event.data);
    }
</script>
</html>